package com.taxshare.purchaser.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.taxshare.mybatis.entity.BaseEntity;
import com.taxshare.purchaser.constant.TableConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author YANG
 * @ClassName: DetailEntity
 * @Description:
 * @date 2021-04-02
 */
@Data
@ApiModel(description = "发票明细")
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(TableConstant.T_PURCHASER_INVOICE_DETAIL)
public class InvoiceDetailEntity extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId("uuid")
    private String uuid;

    @ApiModelProperty("关联ID")
    @TableField("link_id")
    private String linkId;

    @ApiModelProperty("序号")
    @TableField("detail_no")
    private String detailNo;

    @ApiModelProperty("发票代码")
    @TableField("invoice_code")
    private String invoiceCode;

    @ApiModelProperty("发票号码")
    @TableField("invoice_no")
    private String invoiceNo;

    @ApiModelProperty("商品名称")
    @TableField("goods_name")
    private String goodsName;

    @ApiModelProperty("规格型号")
    @TableField("model")
    private String model;

    @ApiModelProperty("单位")
    @TableField("unit")
    private String unit;

    @ApiModelProperty("商品数量")
    @TableField("goods_number")
    private String goodsNumber;

    @ApiModelProperty("单价")
    @TableField("unit_price")
    private String unitPrice;

    @ApiModelProperty("税率")
    @TableField("tax_rate")
    private String taxRate;

    @ApiModelProperty("不含税单价")
    @TableField("unit_price_out_tax")
    private String unitPriceOutTax;

    @ApiModelProperty("不含税金额")
    @TableField("amount_with_out_tax")
    private String amountWithOutTax;

    @ApiModelProperty("税额")
    @TableField("tax_amount")
    private String taxAmount;

    @ApiModelProperty("含税金额")
    @TableField("amount_with_tax")
    private String amountWithTax;

    @ApiModelProperty("税收分类编码")
    @TableField("tax_code")
    private String taxCode;

    @ApiModelProperty("发票行性质")
    @TableField("invoice_row_nature")
    private String invoiceRowNature;

    @ApiModelProperty("零税率标识 空为正常税率 1 免税2 不征税 3普通零税率")
    @TableField("tax_rate_mark")
    private String taxRateMark;

    @ApiModelProperty("优惠政策标识（0无优惠政策 1有优惠政策）")
    @TableField("preferential_mark")
    private String preferentialMark;

    @ApiModelProperty("优惠政策名称")
    @TableField("preferential_name")
    private String preferentialName;

    @ApiModelProperty("是否红冲标志")
    @TableField("red_mark")
    private String redMark;

    @TableField("create_time_str")
    private String createTimeStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());


}